import request from '@/utils/request'

// 查询电子印章维护列表
export function listOaElectronicSignatureMaintain(query) {
  return request({
    url: '/maintain/oaElectronicSignatureMaintain/list',
    method: 'get',
    params: query
  })
}

// 查询电子印章维护详细
export function getOaElectronicSignatureMaintain(id) {
  return request({
    url: '/maintain/oaElectronicSignatureMaintain/' + id,
    method: 'get'
  })
}

// 保存电子印章维护
export function saveOaElectronicSignatureMaintain(data) {
  return request({
    url: '/maintain/oaElectronicSignatureMaintain/save',
    method: 'post',
    data: data
  })
}

// 删除电子印章维护
export function delOaElectronicSignatureMaintain(id) {
  return request({
    url: '/maintain/oaElectronicSignatureMaintain/' + id,
    method: 'delete'
  })
}
// 导出电子印章维护
export function exportOaElectronicSignatureMaintain(query) {
  return request({
    url: '/maintain/oaElectronicSignatureMaintain/export',
    method: 'get',
    params: query
  })
}
// 同步契约锁
export function updateByQiYueSuo() {
  return request({
    url: '/maintain/oaElectronicSignatureMaintain/updateByQiYueSuo',
    method: 'post'
  })
}

// 根据公司名称直接调用契约锁获取对应的印章及图片地址
export function getSealByCompanyName(companyName) {
  return request({
    url: '/maintain/oaElectronicSignatureMaintain/getSealByCompanyName/' + companyName,
    method: 'get'
  })
}

// 根据主体ID获取详情
export function getSealInfoByInvestId(investId) {
  return request({
    url: '/maintain/oaElectronicSignatureMaintain/getSealInfoByInvestId/' + investId,
    method: 'get'
  })
}
